package com.ravi.common.exception;

import com.ravi.common.constant.CheckExceptionEnum;

public class CheckException extends RuntimeException{
	private final Integer code;
	private final String message;

	public CheckException(Integer code, String message) {
		this.code = code;
		this.message = message;
	}

	public CheckException(CheckExceptionEnum exceptionEnum) {
		this(exceptionEnum.getCode(), exceptionEnum.getMsg());
	}

	public Integer getCode() {
		return code;
	}

	@Override
	public String getMessage() {
		return message;
	}
}
